package com.bishe.tax.service;

import com.bishe.tax.entity.IndexPicture;
import com.bishe.tax.mapper.IndexPictureMapper;
import com.bishe.tax.utils.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 首页图片 服务层实现
 *
 * @author ruoyi
 * @date 2019-06-23
 */
@Service
public class IndexPictureService {
    @Autowired
    private IndexPictureMapper pictureMapper;

    /**
     * 查询首页图片信息
     *
     * @param pictureId 首页图片ID
     * @return 首页图片信息
     */

    public IndexPicture selectPictureById(Integer pictureId) {
        return pictureMapper.selectPictureById(pictureId);
    }

    /**
     * 查询首页图片列表
     *
     * @param picture 首页图片信息
     * @return 首页图片集合
     */

    public List<IndexPicture> selectPictureList(IndexPicture picture) {
        return pictureMapper.selectPictureList(picture);
    }

    /**
     * 新增首页图片
     *
     * @param picture 首页图片信息
     * @return 结果
     */

    public int insertPicture(IndexPicture picture) {
        return pictureMapper.insertPicture(picture);
    }

    /**
     * 修改首页图片
     *
     * @param picture 首页图片信息
     * @return 结果
     */

    public int updatePicture(IndexPicture picture) {
        return pictureMapper.updatePicture(picture);
    }

    /**
     * 删除首页图片对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */

    public int deletePictureByIds(String ids) {
        return pictureMapper.deletePictureByIds(Convert.toStrArray(ids));
    }

}
